package com.wenlin.myproduction.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author 文琳_377979485@qq.com
 * @time 2021/10/12 0012 下午 5:11
 * @desc 排班管理的内容列表的实体类
 */
public class ScheduleContentBean implements Parcelable {
    private ScheduleRecordBean.ListsDTO listsDTO;

    private boolean edit;

    public ScheduleContentBean(ScheduleRecordBean.ListsDTO listsDTO) {
        this.listsDTO = listsDTO;
    }

    public ScheduleRecordBean.ListsDTO getListsDTO() {
        return listsDTO;
    }

    public void setListsDTO(ScheduleRecordBean.ListsDTO listsDTO) {
        this.listsDTO = listsDTO;
    }

    public boolean isEdit() {
        return edit;
    }

    public void setEdit(boolean edit) {
        this.edit = edit;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.listsDTO, flags);
        dest.writeByte(this.edit ? (byte) 1 : (byte) 0);
    }

    public void readFromParcel(Parcel source) {
        this.listsDTO = source.readParcelable(ScheduleRecordBean.ListsDTO.class.getClassLoader());
        this.edit = source.readByte() != 0;
    }

    protected ScheduleContentBean(Parcel in) {
        this.listsDTO = in.readParcelable(ScheduleRecordBean.ListsDTO.class.getClassLoader());
        this.edit = in.readByte() != 0;
    }

    public static final Creator<ScheduleContentBean> CREATOR = new Creator<ScheduleContentBean>() {
        @Override
        public ScheduleContentBean createFromParcel(Parcel source) {
            return new ScheduleContentBean(source);
        }

        @Override
        public ScheduleContentBean[] newArray(int size) {
            return new ScheduleContentBean[size];
        }
    };
}
